#ifndef PIECE_H
#define PIECE_H

#include <QWidget>
#include <QPushButton>
#include <vector>
#include <memory>
#include <string>
#include <string.h>
#include <QPixmap>
#include <cctype>
#include <algorithm>
#include <QDebug>

/* 0 represents white, 1 represents black */

/* corresponding relation between binary number and piece's type:
 * TODO
*/

using std::vector;
using std::shared_ptr;
using std::string;


class Piece : public QPushButton
{
    Q_OBJECT

    friend class Game;

public:
    //basic member variable
    int color;
    string type;
    QPixmap img;
    int score;
    QPoint coord;

    //the unique identification of piece
    int number;
    bool isAlive = true;

    vector<shared_ptr<QPushButton*>> options;



public:
    explicit Piece(int color, string type, QWidget *parent = nullptr);

    //set the unique identification of piece
    void setNumber(int num);

    void moveTo(int x, int y);

signals:

};

#endif // PIECE_H
